<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>上传图片</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="jquery/jquery-3.1.1.js"></script>
	<link rel="stylesheet" href="css/StyleSheet.css" type="text/css" />
	<style type="text/css">
			table{
				color: Black;
				width: 100%;
				border-collapse: collapse;
			}
			table>thead{
				background-color: LightGoldenrodYellow;
				border: 1px solid Tan;
			}
			
			table>thead>tr {
				background-color: Tan;
				line-height: 22px;
				font-size: 13px;
				width: 100%;
			}
			table>tbody{
				width: 100%;
			}
			table>tbody>tr{
				width: 100%;
				height: 20px;
			}
			table input{
				width: 100%;
			}
			table input[type=text]{
				width: 100px;
				border: 1px solid #93971F;
			}
			table input[type=file]{
				background-color: #D4D0C7;
			}
			table select{
				border: 1px solid #93971F;
				width: 50px;
			}
			.contentColor{
				font-size: 12px;
			}
		</style>

  </head>
	<body>
		<span class="contentColor">上传图片个数:</span>
		<input type="text" id="txtCount" required  placeholder="请输入数字1~99" />
		<input type="button" value="设置" class="setCount opt_sub" />
		<input type="button" name="btnUpLoad" value="上传图片" class="opt_sub" />
		<!-------内容区--------------->
		<div class="content">
			
		
		<table>
			<thead>
				<tr>
					<th>
						图片源
					</th>
					<th>
						标题
					</th>
					<th>
						描述
					</th>
					<th>
						相册
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>
						<input type="file" class="fupImage" />
					</td>
					<td>
						<input type="text" class="txtTitle input1" />
					</td>
					<td>
						<input type="text" class="txtDesc input1" />
					</td>
					<td>
						<select name="ddlGalleries">
							<option value="1">长城</option>
						</select>
					</td>
				</tr>
			</tbody>
		</table>
		</div>
		<br />
		<script type="text/javascript">
			$('.setCount').on('mouseup',function(e){
				if($('#txtCount').val()>0 && $('#txtCount').val()<100)
				{
					setCount($('#txtCount').val());
					var cssHeight = 20 * $('#txtCount').val() +"px";
					$('content').css('height','100px');
				}
				else{
					alert('请输入数字1~99');
				}
			});
			function setCount(count){
				$('tbody>tr:first').siblings().remove();
				for (var i = 1; i < count; i++) {
					$('tbody>tr:first').clone().appendTo('tbody');
				}
			}
		</script>
	</body>

</html>

